<?php
namespace Home\Model;
use Think\Model;

class StationAbutmentLogModel extends BaseModel{
    //请求快递log表
    protected $tableName = 'tp_station_abutment_log';

    /**
     * @desc 获取快递公司快递数据
     * @author quyang
     * @update 2016-12-22
     */
    public function queryExpressData($method){
        $data = $this->where($method)->field('f_parcel_id,f_station_id,f_type,f_com_id,f_mail_no,f_com_name,f_station_name,f_tel,f_common,f_recipient_name,f_storage_status')->select();
        return $data;
    }

    /**
     * @desc 更新快递公司请求状态
     * @author quyang
     * @update 2016-12-22
     */
    public function updateExpressData($parcelId,$method){
        $this->where(array('f_parcel_id'=>$parcelId))->save($method);
    }

    /**
     * @desc 查询包裹是否在快递队列表
     * @author quyang
     * @update 2017-1-11
     */
    public function queryParcelData($where){
        $data = $this->where($where)->getField('f_id');
        return $data;
    }
    

}